<template>
	<view class="layout gradient-background">
		<view class="user-card">
			<image src="../../static/logo.png" mode="aspectFill"></image>
			<view class="user-name">234.565.43</view>
			<view class="user-location">来自：xxx</view>
		</view>
		<view class="data-card card1">
			<view class="data-card-item" v-for="item in cardList1">
				<view class="left">
					<uni-icons class="uni-icons" :type="item.icon"></uni-icons>
					{{item.title}}
				</view>
				<view class="right">
					{{item.static}}
					<uni-icons type="right"></uni-icons>
				</view>
			</view>
		</view>
		<view class="data-card card2">
			<view class="data-card-item" v-for="item in cardList2">
				<view class="left">
					<uni-icons :type="item.icon"></uni-icons>
					{{item.title}}
				</view>
				<view class="right">
					{{item.static}}
					<uni-icons type="right"></uni-icons>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	var cardList1=[
		{icon:"download",title:"我的下载",static:0},
		{icon:"star",title:"我的评分",static:2},
		{icon:"phone",title:"联系客服",static:null}
	]
	var cardList2=[
		{icon:"notification",title:"订阅更新",static:null},
		{icon:"compose",title:"常见问题",static:null}
	]
</script>

<style lang="scss" scoped>
	@import "../../uni.scss";
	.uni-icons{
		color: red;
		fill: red;
	}
	.layout{
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.user-card{
		width: 700rpx;
		height: 400rpx;
		margin-top: 100rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		image{
			width: 160rpx;
			height: 160rpx;
			border-radius: 50%;
			overflow: hidden;
			width: 160rpx;
			height: 160rpx;
			margin-top: 50rpx;
			margin-bottom: 30rpx;
		}
		.user-name{
			font-size: 35rpx;
			margin-bottom: 10rpx;
		}
		.user-location{
			font-size: 30rpx;
		}
	}
	.data-card{
		border: 1rpx solid rgba(158, 158, 158, 0.4);
		box-shadow: 0 0 20rpx rgba(145, 145, 145, 0.2);
		border-radius: 20rpx;
	}
	.data-card.card1{
			margin-bottom: 50rpx;
	}
	.data-card-item{
		width: 680rpx;
		height: 100rpx;
		display: flex;
		padding: 30rpx;
		justify-content: space-between;
		font-size: 30rpx;
		font-weight: 500;
		border-bottom:  1rpx solid rgba(158, 158, 158, 0.4);
		box-sizing: border-box;
	}
	.data-card-item:last-child{border-bottom: none;}
</style>
